package com.wlj.utils.suanfa;

public class Edge {
    private int a,b;
    private int weight;


    public Edge(int a, int b, int weight) {
        this.a = a;
        this.b = b;
        this.weight = weight;
    }

    public int v(){
        return a;
    }
    public int w(){
        return b;
    }
    public int wt(){
        return weight;
    }
    public int other(int x){
        assert(x==a||x==b);
        return x==a?b:a;
    }

}
